﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GameServer.Networking.Packets
{
    class PACKET_SIGN_UP : Packet
    {
        public PACKET_SIGN_UP(Virtual_Objects.User.virtualUser User)
        {
            newPacket(30777);
            addBlock(1);
            int ItemCount = 0;
            StringBuilder WeaponList = new StringBuilder();
            for (int I = 0; I < 30; I++)
            {
            if (User.Inventory[I] != null)
            {
            InventoryItem _Inv = User.Inventory[I];
            TimeSpan ExpireTime = DateTime.Now - new DateTime(1970, 1, 1, 0, 0, 0).AddSeconds(_Inv._StartTime);
            WeaponList.Append(_Inv._Code.ToUpper() + "-3-0-" + _Inv._StartTime + "-0-0-0-0-0-9999-9999,");/*+ ExpireTime.TotalSeconds +*/
            ItemCount++;
            }
            }
            for (int J = 0; J < (30 - ItemCount); J++)
            {
            WeaponList.Append("^,");
            }
            addBlock(WeaponList.ToString().Remove(WeaponList.ToString().Length - 1));
            addBlock("^,^,^,^,^,^,^,^,^,^,^,^,^,^,^,^,^,^,^,^,^,^,^,^,^,^,^,^,^,^");
        }
    }
}